package thirteen.test01;

import java.io.File;
import java.io.IOException;

public class Test01 {
    public static void main(String[] args) throws IOException {
        for (int i = 1; i <= 5; i++) {
            File dir = new File("./a");
            if (dir.exists()){
                File file = new File("./a/test"+i+".txt");
                if (!file.exists()){
                    file.createNewFile();
                }else {
                    System.out.println("文件已存在");
                }
            }else {
                System.out.println("目录不存在");
            }
        }
    }
}
